<template>
  <el-form class="right-event-msg">
    <input-normal label="发送用户uid" tooltips="可以是空(登录用户uid)，也可以指定用户uid" placeholder="可以是空(登录用户uid)，也可以指定用户uid" v-model="wbData.send_uid" @change="onUpdateWbComponent"></input-normal>
    <input-normal label="关联组件id" tooltips="获取发送用户uid关联组件id" placeholder="获取发送用户uid关联组件id" v-model="wbData.rec_uid" @change="onUpdateWbComponent"></input-normal>
    <!-- <input-normal label="关联组件id" v-model="wbData.compId" @change="onUpdateWbComponent"></input-normal> -->
    <div class="lists margin-bottom-10 margin-left-right-16">
      <el-button type="primary"  @click.stop="onAddWbItem" class="margin-bottom-10"><el-icon><i class="jy-icon-plus"></i></el-icon>增加随机文案</el-button>
      <add-list-item :lists="eventWbLists" :onUpdateItem="onUpdateWbItem" :onDeleteItem="onDeleteWbItem"></add-list-item>
    </div>
  </el-form>
</template>

<script>
import InputNormal from '@/views/components/edit/InputNormal.vue'
import AddListItem from '@/views/components/add-list-item.vue'

import { addUtils } from "@/views/js/add-utils"

  export default {
    mixins: [addUtils],
    components: {
      InputNormal,
      AddListItem
    },
    methods:{
      onDeleteWbItem(index){
        let params = {controlId: this.event.controlId, index};
        this.eventWbLists.splice(index, 1);
        this.deleteWbComponentItem(params);
      },
    }
  }
</script>